3.278 \(\int \frac{\sec (x)}{(a-a \sin ^2(x))^2} \, dx\)

Optimal. Leaf size=35 \[ \frac{3 \tanh ^{-1}(\sin (x))}{8 a^2}+\frac{\tan (x) \sec ^3(x)}{4 a^2}+\frac{3 \tan (x) \sec (x)}{8 a^2} \]

[Out]

(3*ArcTanh[Sin[x]])/(8*a^2) + (3*Sec[x]*Tan[x])/(8*a^2) + (Sec[x]^3*Tan[x])/(4*a^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0480322, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3175, 3768, 3770} \[ \frac{3 \tanh ^{-1}(\sin (x))}{8 a^2}+\frac{\tan (x) \sec ^3(x)}{4 a^2}+\frac{3 \tan (x) \sec (x)}{8 a^2} \]

Antiderivative was successfully verified.

[In]

Int[Sec[x]/(a - a*Sin[x]^2)^2,x]

[Out]

(3*ArcTanh[Sin[x]])/(8*a^2) + (3*Sec[x]*Tan[x])/(8*a^2) + (Sec[x]^3*Tan[x])/(4*a^2)

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\sec (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx &=\frac{\int \sec ^5(x) \, dx}{a^2}\\ &=\frac{\sec ^3(x) \tan (x)}{4 a^2}+\frac{3 \int \sec ^3(x) \, dx}{4 a^2}\\ &=\frac{3 \sec (x) \tan (x)}{8 a^2}+\frac{\sec ^3(x) \tan (x)}{4 a^2}+\frac{3 \int \sec (x) \, dx}{8 a^2}\\ &=\frac{3 \tanh ^{-1}(\sin (x))}{8 a^2}+\frac{3 \sec (x) \tan (x)}{8 a^2}+\frac{\sec ^3(x) \tan (x)}{4 a^2}\\ \end{align*}

Mathematica [A]  time = 0.0070534, size = 61, normalized size = 1.74 \[ \frac{\frac{1}{2} (11 \sin (x)+3 \sin (3 x)) \sec ^4(x)-6 \log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )+6 \log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )}{16 a^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[x]/(a - a*Sin[x]^2)^2,x]

[Out]

(-6*Log[Cos[x/2] - Sin[x/2]] + 6*Log[Cos[x/2] + Sin[x/2]] + (Sec[x]^4*(11*Sin[x] + 3*Sin[3*x]))/2)/(16*a^2)

________________________________________________________________________________________

Maple [B]  time = 0.049, size = 66, normalized size = 1.9 \begin{align*}{\frac{1}{16\,{a}^{2} \left ( -1+\sin \left ( x \right ) \right ) ^{2}}}-{\frac{3}{16\,{a}^{2} \left ( -1+\sin \left ( x \right ) \right ) }}-{\frac{3\,\ln \left ( -1+\sin \left ( x \right ) \right ) }{16\,{a}^{2}}}-{\frac{1}{16\,{a}^{2} \left ( 1+\sin \left ( x \right ) \right ) ^{2}}}-{\frac{3}{16\,{a}^{2} \left ( 1+\sin \left ( x \right ) \right ) }}+{\frac{3\,\ln \left ( 1+\sin \left ( x \right ) \right ) }{16\,{a}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)/(a-a*sin(x)^2)^2,x)

[Out]

1/16/a^2/(-1+sin(x))^2-3/16/a^2/(-1+sin(x))-3/16/a^2*ln(-1+sin(x))-1/16/a^2/(1+sin(x))^2-3/16/a^2/(1+sin(x))+3
/16/a^2*ln(1+sin(x))

________________________________________________________________________________________

Maxima [A]  time = 0.984979, size = 77, normalized size = 2.2 \begin{align*} -\frac{3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )}{8 \,{\left (a^{2} \sin \left (x\right )^{4} - 2 \, a^{2} \sin \left (x\right )^{2} + a^{2}\right )}} + \frac{3 \, \log \left (\sin \left (x\right ) + 1\right )}{16 \, a^{2}} - \frac{3 \, \log \left (\sin \left (x\right ) - 1\right )}{16 \, a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a-a*sin(x)^2)^2,x, algorithm="maxima")

[Out]

-1/8*(3*sin(x)^3 - 5*sin(x))/(a^2*sin(x)^4 - 2*a^2*sin(x)^2 + a^2) + 3/16*log(sin(x) + 1)/a^2 - 3/16*log(sin(x
) - 1)/a^2

________________________________________________________________________________________

Fricas [A]  time = 1.92176, size = 146, normalized size = 4.17 \begin{align*} \frac{3 \, \cos \left (x\right )^{4} \log \left (\sin \left (x\right ) + 1\right ) - 3 \, \cos \left (x\right )^{4} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \,{\left (3 \, \cos \left (x\right )^{2} + 2\right )} \sin \left (x\right )}{16 \, a^{2} \cos \left (x\right )^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a-a*sin(x)^2)^2,x, algorithm="fricas")

[Out]

1/16*(3*cos(x)^4*log(sin(x) + 1) - 3*cos(x)^4*log(-sin(x) + 1) + 2*(3*cos(x)^2 + 2)*sin(x))/(a^2*cos(x)^4)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\sec{\left (x \right )}}{\sin ^{4}{\left (x \right )} - 2 \sin ^{2}{\left (x \right )} + 1}\, dx}{a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a-a*sin(x)**2)**2,x)

[Out]

Integral(sec(x)/(sin(x)**4 - 2*sin(x)**2 + 1), x)/a**2

________________________________________________________________________________________

Giac [A]  time = 1.11668, size = 63, normalized size = 1.8 \begin{align*} \frac{3 \, \log \left (\sin \left (x\right ) + 1\right )}{16 \, a^{2}} - \frac{3 \, \log \left (-\sin \left (x\right ) + 1\right )}{16 \, a^{2}} - \frac{3 \, \sin \left (x\right )^{3} - 5 \, \sin \left (x\right )}{8 \,{\left (\sin \left (x\right )^{2} - 1\right )}^{2} a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)/(a-a*sin(x)^2)^2,x, algorithm="giac")

[Out]

3/16*log(sin(x) + 1)/a^2 - 3/16*log(-sin(x) + 1)/a^2 - 1/8*(3*sin(x)^3 - 5*sin(x))/((sin(x)^2 - 1)^2*a^2)